package com.xyh.system.controller;


import com.xyh.common.util.ResultVO;
import com.xyh.system.service.ISysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 * 操作日志表 前端控制器
 * </p>
 *
 * @author kyle
 * @since 2021-01-05
 */
@Controller
@RequestMapping("/sysLog")
public class SysLogController {

    @Autowired
    private ISysLogService sysLogService;
    /**
     *
     * 跳转到系统日志管理列表界面
     *
     * @return
     */
    @GetMapping("/index")
    public String toIndex() {
        System.out.println("=====SysLogController.toIndex=====");
        return "log/sysLog";
    }

    @GetMapping("/list")
    @ResponseBody
    public ResultVO getList() {
        System.out.println("=====SysLogController.getList=====");
        return ResultVO.success(sysLogService.list());
    }

}
